<template>
  <!-- 左图右字单列 -->
  <div>
    <div
      v-for="item in list"
      :key="item.workId"
      class="left-img-right-text-item"
      v-app-jump="{ to: `mtjimu://works?id=${item.workId}` }"
    >
      <div class="cover-img" v-if="item.cover">
        <img :src="item.cover | imgSize(283, 160)" />
        <!-- <div class="cover" v-if="item.viewCnt">
          <div class="view-num">{{ item.viewCnt }}</div>
        </div> -->
      </div>
      <div class="right" v-if="item.cover">
        <p class="title double-line-ellipsis">
          {{ item.title }}
        </p>
        <p class="category">{{ item.category }}</p>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    props: {
      list: {
        type: Array,
        default: () => [],
      },
    },
    data() {
      return {};
    },
    methods: {},
  };
</script>
<style lang="less" scoped>
  .left-img-right-text-item {
    display: flex;
    margin-bottom: 4rem;
    .cover-img {
      width: 28.3rem;
      height: 16rem;
      overflow: hidden;
      position: relative;
      margin-right: 2rem;
      flex: none;
      .cover {
        height: 8rem;
        padding: 1.5rem;
        .view-num {
          position: absolute;
          bottom: 1.5rem;
        }
      }
      img {
        width: 28.3rem;
        height: 16rem;
      }
    }
    .right {
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      .category {
        font-size: 2.4rem;
        color: rgba(#ffffff, 0.5);
        line-height: 1.6rem;
      }
    }
    .title {
      font-size: 2.8rem;
      font-weight: 800;
      color: rgba(#ffffff, 0.9);
      line-height: 4rem;
    }
  }
</style>
